<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>


    <script>
        var a = 3, b = 4;
        a = 7;
        b = a - b;
        a = a - b;
        console.log("a = " + a + ",b=" + b);
        document.write([[] == [], [] === [], 4 == [4], 4 === [4]]);

        var xh = {
            age: 18,
            score: 90
        };
        var xm = {
            age: 22,
            score: 80
        };

        function equalObj(a, b) {
            for (var p in a) {
                // console.log(p);
                if (a[p] !== b[p]) return false;
            }
            return true;
        }
        console.log(equalObj(xh, xm));
    </script>
</body>

</html>